//
//  StudentClassSureViewController.m
//  CoachsBook
//
//  Created by MaBookPro on 2022/8/11.
//

#import "StudentClassSureViewController.h"
#import "StudentClassSureCell.h"



@interface StudentClassSureViewController ()<UITableViewDelegate,UITableViewDataSource>{
    
    UITableView *_Tabview;
    StudentClassSureCell *Cell;
}

@end

@implementation StudentClassSureViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    //隐藏头部view
    self.navigationController.navigationBar.hidden = YES;
    NavigationHeadView *navgationheadv = [[NavigationHeadView alloc]initWithFrame:CGRectMake(0, 0, APPwidth, SafeAreaTopHight)];
    navgationheadv.backgroundColor = [UIColor whiteColor];
    navgationheadv.titlelabel.text = @"学员约课确认";
    navgationheadv.titlelabel.textColor = [UIColor blackColor];
    [navgationheadv.backbtn addTarget:self action:@selector(returnback) forControlEvents:UIControlEventTouchUpInside];
    navgationheadv.rightbtn.hidden = NO;
    [navgationheadv.rightbtn setTitle:@"设置" forState:0];
    [navgationheadv.rightbtn setTitleColor:rgba(22, 120, 255, 1) forState:0];
    [navgationheadv.rightbtn addTarget:self action:@selector(setBtnClick) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:navgationheadv];

    _Tabview  = [[UITableView alloc]initWithFrame:CGRectMake(0, SafeAreaTopHight, APPwidth, APPheight+SafeAreaBottomHeight)];
    _Tabview.delegate = self;
    _Tabview.dataSource = self;
    _Tabview.separatorStyle = UITableViewCellSeparatorStyleNone;
    [self.view addSubview:_Tabview];

}
#pragma mark - UITableView DataSource

-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    
    return 140;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 6;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    
    static NSString * str = @"cell";
    
    Cell  = [tableView dequeueReusableCellWithIdentifier:str];
    if (Cell == nil) {
        
        Cell = [[StudentClassSureCell alloc] initWithStyle: UITableViewCellStyleDefault reuseIdentifier:str];
    }
    
    Cell.nameLab.text = @"学员: 小芒果";
    
    Cell.selectionStyle = UITableViewCellSelectionStyleNone;

    return Cell;
}
 
-(void)setBtnClick{
    
}
-(void)returnback{
    [self.navigationController popViewControllerAnimated:YES];
}

#pragma mark -视图即将出现
-(void)viewWillAppear:(BOOL)animated{
        
    ((TabbarController *)self.tabBarController).tabBarView.hidden = YES;
    
}
@end
